package com.eben.model;

import android.graphics.Canvas;
import android.graphics.Color;

public class Point extends GameObject{

	private int points;
	
	/**
	 * Creates a fully customizable point
	 * @param velocity the speed of the point
	 * @param direction the direction of the point
	 * @param position the starting position of the point
	 * @param radius the radius of the point
	 * @param color the color of the point
	 * @param points how many points the point is worth
	 */
	public Point(double velocity, double direction, Position position, int radius, int color, int points){
		super(velocity, direction, position, radius, color);
		this.setPoints(points);
		paint.setColor(color);
	}
	/**
	 * Creates a point with 0 velocity and 0 direction.
	 * @param position the starting position
	 * @param radius the radius of the point
	 * @param color the color of the point
	 * @param points how many points the point is worth
	 */
	public Point(Position position, int radius, int color, int points){
		this(0, 0, position, radius, color, points);
	}
	
	/**
	 * Creates a point with 0 velocity and 0 direction with standard radius, color and points.
	 * @param position the starting position of the point.
	 */
	public Point(Position position) {
		this(0, 0, position, 10, Color.YELLOW, 1);
	}
	
	@Override
	public void draw(Canvas canvas) {
		canvas.drawCircle((float)position.getX(), (float)position.getY(), radius, paint);
	}

	@Override
	public void updatePosition() {
		//Does nothing because a Point is still at the moment.
	}
	
	public void setPoints(int point) {
		this.points = point;
	}
	
	public int getPoints() {
		return points;
	}
}